<div id="name"></div>
<script>
    // console.log('showUser----')
    axios.get('userInfo')
        .then(res=>{
            console.log(res);
            if(res.data.code==401){
                window.location.href="/login"
            }
            if(res.data.code==200){
                const {user}=res.data.user
                console.log('////');
                document.getElementById('name').innerHTML=user.name
            }
        })
</script>